package com.example.model2.factory;

/**
 * @version 1.0.0
 * @className: Factory
 * @description:
 * @author: rosszhang
 * @date: 2022/5/16 17:32
 */
public class Factory {
    public BMW createBMW(int type) {
        switch (type) {
            case 320:
                return new BMW320();
            case 523:
                return new BMW523();
            default:
                break;
        }
        return null;
    }
}
